<!DOCTYPE html>
<!-- saved from url=(0042)http://v3.bootcss.com/examples/jumbotron/# -->
<html lang="zh-CN">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title data-localize='title'>众源数据</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link href="css/reset.css" rel="stylesheet" />
    <link href="css/bootstrap.css" rel="stylesheet" />
    <link href="css/nf.min.css" rel="stylesheet" />
    <link href="css/swiper.min.css" rel="stylesheet" />
    <link href="css/css.css" rel="stylesheet" />
    <link href="css/zy.css" rel="stylesheet">

    <script src="js/jquery.min.js"></script>
    <script src="js/layer/layer.js"></script>
    <script src="js/uaredirect.js" type="text/javascript" ></script>
    <script type="text/javascript" >uaredirect("http://www.usources.cn/phoneIndex.html");</script>
	
	<link rel="stylesheet" href="css/xingchao.css">
    <link rel="stylesheet" href="css/jquery.page.css">
	
	<script>
		function urlMapNshow(){		
			var URLValue = document.getElementById("onturl").value;
			if(URLValue==null || URLValue==''){
				alert('please input ontology URL');
				return;
			}
			var customLabel = document.getElementById("customLabel").value;
			var buttonStatus = document.getElementById("clickShow");	
			$("#clickShow").attr("disabled",true);
			$("#clickShow").html("正在执行，可能需要几分钟，请耐心等待。。。");			
			alert(URLValue);
			
			try{
				var chkObjs = document.getElementsByName("targetKG"); 
				for(var i=0;i<chkObjs.length;i++){ 
					if(chkObjs[i].checked){ 
						chk = i; 
						if(chk==1){
							alert('the KB is coming soon!');
						} else if(chk==2){
							$.ajax({
							  url:'http://www.usources.cn:8080/entitylink/urlMap2PubMed',
							  //type:'GET',
							  data:{ontURL:URLValue,cusProURI:customLabel},
							  async: true,
							  cache: false,
							  contentType: false,
							  success:function(data){			  
									document.getElementById("mapresult").value = data;		
							  }
							});
						} else {
							$.ajax({
							  //url:'http://www.usources.cn:8080/entitylink/urlMap2DBPedia',
							  url:'http://localhost:8080/LSH/entitylink/urlMap2DBPedia',
							  //type:'GET',
							  data:{ontURL:URLValue,cusProURI:customLabel},
							  async: true,
							  cache: false,
							  contentType: false,
							  success:function(data){			  
									document.getElementById("mapresult").value = data;		
							  }
							});
						}
					}
				} 
			}
			finally{
				//restore the button status
				$("#clickShow").attr("disabled",false);	
				$("#clickShow").html("点击一键融合(结果显示在下方)");
			}				
		}
		
		function fileMapNshow(){
			ontFile = $("#ontFile")[0].files[0];
			var formData = new FormData();
			formData.append("ontFile",ontFile);
			formData.append("url",url);
			$.ajax({
			  url:'http://www.usources.cn:8080/entitylink/fileMap2DBPedia',
			  type:'POST',
			  data:formData,
			  async: true,
			  cache: false,
			  contentType: false,
			  processData: false,
			  success:function(data){
					document.getElementById("mapresult").value = data;			 
			  }
			});
			
		}
	</script>
</head>

  
   <body style="background: #EFEFEF;">
   
 <!--  
	头部
-->
<div class="head">
	<div class="w" style="height:50px;">
		<a href="index.html">
			<img src="images/logo.png" alt="" width="150px;">
		</a>
		<ul class="nav r">
	       <li class="cur">
	            <a href="index.html">众源</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="ziyuan.html">资源搜索</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="jiaocheng.html">使用教程</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="biaozhun.html">众源标准</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="page.html">关于我们</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="user.html" id="user-box">会员中心</a>|<a href="user.html?action=out">退出</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li id="langBox">
                <a href="#" data-lang='zh-CN'>中</a>&nbsp;|
                <a href="#" data-lang="en-US">EN</a>
                <sub class="sub1"></sub>
            </li>
		</ul>
	</div>
</div>  

<div class="container">

<div class="page-header">
  <h2><strong>数据链接和融合（<a href="" target="_blank">查看教程</a>）</strong></h2>
</div>
	<div class="row">
		<div class="col-md-5" style="background-color:">
			<div class="page-header">
				<h3>
					左侧：设置您的数据
				</h3>
			</div>
			<form class="form-group" enctype="multipart/form-data">
			
					<div class="form-group">
						  <label>1.默认主要标签属性：</label> 				  
							<input type="checkbox" checked='checked'/> rdfs:label
							<input type="checkbox" checked='checked'/> skos:preLabel
						 <br>
							<input type="checkbox" checked='checked'/> foaf:name 
							<input type="checkbox" checked='checked'/> dc:subject
					</div>	
					<div class="form-group">
						<label>2. 用户指定标签:</label>		
						<input id="customLabel" style="width:80%" type="text"  class="i1" placeholder="例: http://www.library.cn/bookTitle">
					</div><br>
				<div class="form-group">
					<label>3. 输入本体url(或上传文件到众源后可查看URL) *: </label>	
					<ul class="nav nav-tabs">
					  <li class="active" style="padding-left:0"><a data-toggle="tab" href="#home" aria-expanded="true">输入本体URL</a></li>
					  <!--<li class="" style="padding-left:0"><a data-toggle="tab" href="#menu1" id="guidchosen" aria-expanded="false">上传本体文件</a></li>-->
					</ul>
					<div class="tab-content">
					  <div id="home" class="tab-pane fade active in">
					    <h4>输入本体地址：</h4>
					    <div class="input-group">
					        <input type="text" id="onturl" class="form-control" placeholder="ontology URL">
					    </div>  
					  </div><!-- home -->
					  <div id="menu1" class="tab-pane fade">
					    <div class="form-group">				
							<input style="width:80%" type="file"  id="ontFile" class="i1" id="ontFile" placeholder="上传本体文件">
						</div>
					  </div><!-- menu1 -->
					</div><!-- tab-content -->
				</div><!-- end of form-group -->

			
			</form>
		</div>
		<div class="col-md-2">
		</div>
		<div class="col-md-5" style="background-color:">
			<div class="page-header">
				<h3>
					右侧：选择目标数据
				</h3>
			</div> 
			<label class="checkbox"><input type="radio" value="0" name="targetKG" checked='checked' /> 英文知识库：DBPedia 维基百科 （已正式开通）</label> 
			<label class="checkbox"><input type="radio" value="1" name="targetKG" /> 中文知识库：众源百度百科知识库 （建设中，Coming soon...）</label>
			<label class="checkbox"><input type="radio" value="2" name="targetKG" /> PubMed：最大的医学文献库 （测试阶段）</label>
			<hr /> 
			<button class="btn btn-info" type="button" id="clickShow" onclick="urlMapNshow()" >点击一键融合(结果显示在下方)</button> 
			<!--<button class="btn btn-info" type="button">链接&amp;生成TTL文件</button>-->
		</div>
	</div>
	<hr>
	<div class="row">
		<div class="col-md-12">
			<label>输出链接结果：</label>
			<textarea rows="50" class="form-control" name="mappedThings" id="mapresult">
输出结果会以 owl:sameAs 的属性展示每一条记录。
			</textarea>
		</div>
	</div>
</div><!-- end of the container -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="./phoneIndex_files/jquery.min.js.download"></script>
    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
    <script src="./phoneIndex_files/bootstrap.min.js.download"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="./phoneIndex_files/ie10-viewport-bug-workaround.js.download"></script>
  

</body></html>